package SetKnowledge;

import java.util.Scanner;

public class Stairs {

	public static void main(String[] args) {
		Long begin = System.currentTimeMillis();
		Scanner sc = new Scanner(System.in);
		int stairNum = Integer.parseInt(sc.nextLine());// 输入楼梯级数
		int f1 = 1, f2 = 2, n = 0;//n是爬楼梯的方法数
		if (stairNum == 1) {
			n = 1;
			System.out.println(n);
		} else {
			if (stairNum == 2) {
				n = 2;
				System.out.println(n);
			} else {
				for (int i = 2; i < stairNum; i++) {
					n = f1 + f2;
					f1 = f2;
					f2 = n;
				}
			}
		}
		System.out.println(n);
		Long end = System.currentTimeMillis();
		System.out.println(end - begin);
	}
}
